package com.shenzhen.horselive.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.flqy.baselibrary.utils.GlideHelper;
import com.shenzhen.horselive.R;
import com.shenzhen.horselive.beans.RedPackageBean;

import org.jetbrains.annotations.NotNull;

public class SendRecviRedAdapter extends BaseQuickAdapter<RedPackageBean, BaseViewHolder> {
    public SendRecviRedAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, RedPackageBean bean) {
        GlideHelper.loadAdvertImage(bean.getHeadImg(),baseViewHolder.getView(R.id.img_user));
        GlideHelper.loadImage(bean.getCoverImg(),baseViewHolder.getView(R.id.img_img));
        baseViewHolder.setText(R.id.tv_name,bean.getNickname())
                .setText(R.id.tv_content,bean.getDescription())
                .setText(R.id.tv_zan,bean.getZanNum()+"")
                .setText(R.id.tv_comments,bean.getCommentNum()+"");

    }
}
